﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace answer3
{
    class Solution
    {
        public static void Main()
        {
            for(int i = 100; i < 1000; i++){
                if (IsNarcissistic(i)){
                    Console.Write(i + " ");
                }
            }
        }
        public static bool IsNarcissistic(int n)
        {
            int sum  = 0;
            int t = n;
            while(t != 0)
            {
                sum += (int)Math.Pow(t % 10, 3);
                t /= 10;
            }
            return sum == n;
        }
    }
}
